{
 "cells": [
  {
   "cell_type": "markdown",
   "metadata": {},
   "source": [
    "#  pass 语句"
   ]
  },
  {
   "cell_type": "code",
   "execution_count": 7,
   "metadata": {},
   "outputs": [
    {
     "name": "stdout",
     "output_type": "stream",
     "text": [
      "当前的字母为： p  k = 2 \n",
      "这是pass 语句\n",
      "当前的字母为： t  k = 6 \n",
      "当前的字母为： h  k = 6 \n",
      "当前的字母为： o  k = 6 \n",
      "当前的字母为： n  k = 6 \n",
      "\n",
      "\n",
      " pass 和 continue 的 区别   = = = = = = = = = = = = = = = =  \n",
      "\n",
      "\n",
      "当前的字母为： p  i = 1 \n",
      "当前的字母为： t  i = 1 \n",
      "当前的字母为： h  i = 1 \n",
      "当前的字母为： o  i = 1 \n",
      "当前的字母为： n  i = 1 \n"
     ]
    }
   ],
   "source": [
    "str = 'python'\n",
    "k = 2\n",
    "\n",
    "for element in str:\n",
    "    if element == 'y':\n",
    "        pass\n",
    "        k = 6\n",
    "        print('这是pass 语句')\n",
    "    else:\n",
    "        print('当前的字母为：',element,' k = %d '%k)\n",
    "        \n",
    "        \n",
    "print('\\n\\n','pass 和 continue 的 区别   = = = = = = = = = = = = = = = = ','\\n\\n')    \n",
    "    \n",
    "i = 1\n",
    "for element in str:\n",
    "    if element == 'y':\n",
    "        continue\n",
    "        i = 6\n",
    "        print('这是pass 块')\n",
    "    else:\n",
    "        print('当前的字母为：',element,' i = %d '% i)\n"
   ]
  },
  {
   "cell_type": "code",
   "execution_count": null,
   "metadata": {},
   "outputs": [],
   "source": []
  }
 ],
 "metadata": {
  "kernelspec": {
   "display_name": "Python 3",
   "language": "python",
   "name": "python3"
  },
  "language_info": {
   "codemirror_mode": {
    "name": "ipython",
    "version": 3
   },
   "file_extension": ".py",
   "mimetype": "text/x-python",
   "name": "python",
   "nbconvert_exporter": "python",
   "pygments_lexer": "ipython3",
   "version": "3.7.6"
  }
 },
 "nbformat": 4,
 "nbformat_minor": 2
}
